Thin film transistors comprising an oxide semiconductor layer have been developed. Such thin film transistors are employed in displays, for example, of televisions, personal computers, smartphones, tablet computers, etc., as switching elements which control the pixels.
In the thin film transistors comprising the oxide semiconductor layer, the carrier density in the semiconductor layer changes if the semiconductor layer is brought into contact with moisture and hydrogen. As a result, the electrical characteristics of the thin film transistor deteriorate. On the other hand, when, for example, a protective film which protects the semiconductor layer is provided to inhibit the semiconductor layer from being brought into contact with moisture and hydrogen, the processing of the thin film transistor may become complicated.